-
Notifications
You must be signed in to change notification settings - Fork 659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetch available incentives after linking bank account #9735
Fetch available incentives after linking bank account #9735
Conversation
Diffuse output:
APK
DEX
|
33dc828
to
9ae1eba
Compare
b07a81e
to
99bd861
Compare
ac04a94
to
2d0ba4c
Compare
fe65708
to
bff3c83
Compare
a425769
to
29a3cb6
Compare
29a3cb6
to
132e90a
Compare
consumerSessionClientSecret = consumerSessionClientSecret, | ||
requestSurface = requestSurface, | ||
requestOptions = provideApiRequestOptions(useConsumerPublishableKey = true), | ||
).getOrThrow() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more argument against returning Results
-> many times we're forced to unwrap them so that caller can runCatch
reliably.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, my bad. I’ll propagate the Result<T>
to the call-site. This works here because we’re not using suspend { … }
directly, which sort of wants us to throw.
1062ce9
to
7855ff4
Compare
Summary
This pull request adds a call to
consumers/incentives/update_available
at the end of the Instant Bank Payments flow. This endpoint doesn’t return any available incentives yet, but will do so soon.Depending on the response, we return
eligibleForIncentive: Boolean
to the MPE. With a future pull request, it’ll update the payment methods list based on the response.Motivation
CONSUMERBANK-564
Testing
Screenshots
Changelog